<!DOCTYPE html>
<html>
<head>
    <title>大楼</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("device:building:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("device:building:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("device:building:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
					<div class="form-group">
                        <div class="col-sm-2 control-label">大楼编号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="building.buildingCode" placeholder="大楼编号"/>
                        </div>
                    </div>
					<!-- <div class="form-group">
                        <div class="col-sm-2 control-label">省</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="building.provinces" placeholder="省"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">市</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="building.cities" placeholder="市"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">县</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="building.counties" placeholder="县"/>
                        </div>
                    </div> -->
            <div class="form-group">
                <div class="col-sm-2 control-label">所属部门</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" style="cursor:pointer;" v-model="building.deptName"
                           @click="deptTree" readonly="readonly" placeholder="所属部门"/>
                </div>
            </div>
                    <div class="form-group">
                    	<div class="col-sm-2 control-label">省</div>
                    	<div class="col-sm-10"> 
		                    <select name="province" id="province" class="form-control" v-model="building.provinces" placeholder="省">
							</select>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-2 control-label">市</div>
						<div class="col-sm-10">
							<select name="city" id="city" class="form-control" v-model="building.cities" placeholder="市">
							</select>
						</div>
					</div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">县</div>
                        <div class="col-sm-10">
						<select name="town" id="town" class="form-control" v-model="building.counties" placeholder="县">
							<!-- <option value="请选择">请选择</option> -->
						</select>
						</div>
					</div>
                    
					<div class="form-group">
                        <div class="col-sm-2 control-label">楼名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="building.buildingName" placeholder="楼名"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">总楼层数</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="building.buildingNum" placeholder="总楼层数"/>
                        </div>
                    </div>
					<!-- <div class="form-group">
                        <div class="col-sm-2 control-label">创建时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="building.createTime" placeholder="创建时间"/>
                        </div>
                    </div> -->
					<div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

</div>
    <!-- 选择部门 -->
    <div id="deptLayer" style="display: none;padding:10px;">
        <ul id="deptTree" class="ztree"></ul>
    </div>
<script src="${request.contextPath}/statics/js/modules/device/building.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/js/modules/device/area.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/js/modules/device/select.js?_${.now?long}"></script>
</body>
</html>